/*
 * @Author: DUST
 * @Date: 2023-05-26 14:36:49
 * @LastEditors: DUST
 * @LastEditTime: 2023-12-12 13:40:08
 * @FilePath: \business-card-system\server\app\config\index.ts
 * @Description: 
 * undefined
 */
const config  = {
  server: {
    port: process.env.SERVER_PORT
  },
  // 数据库配置
  db: {
    db_host: process.env.DB_HOST,
    db_name: process.env.DB_NAME,
    db_user: process.env.DB_USER,
    db_post: process.env.DN_PORT,
    db_password: process.env.DB_PAWSSWORD,
    db_debuge: process.env.DB_DEBUGE,
  },
  // redis配置
  redis: {
    redis_host: process.env.REDIS_HOST,
    redis_max: process.env.REDIS_MAX,
    redis_post: process.env.REDIS_PORT,
    redis_password: process.env.REDIS_PASSWORD,
  },
  // 安全验证配置
  jwt: {
    secret: process.env.JWT_SECRET,
    expire: process.env.JWT_EXPIRE,
  },
  static: {
    path: process.env.STATC_PATH,
  },
  // 日志配置
  log: {
    appenders: {
      cheese: { type: "file", filename: "logs/cheese.log" },
      access: { type: "file", filename: "logs/access.log" },
      db: { type: "file", filename: "logs/db.log" },
    },
    categories: {
      default: { appenders: ["cheese"], level: "info" },
      access: { appenders: ["access"], level: "info" },
      db: { appenders: ["db"], level: "info" },
    },
  },
  AmapKey: {
    appKey: process.env.AMAPKEY
  },
  // 微信小程序配置
  mini: {
    appId: process.env.APPID,
    secret: process.env.SECRET,
    miniType: process.env.MINITYPE
  }
}

export default config;